package com.example.appjetpackcompose.application

import android.app.Application
import coil.ImageLoader
import coil.ImageLoaderFactory
import com.example.appjetpackcompose.util.UnsplashSizingInterceptor
import dagger.hilt.android.HiltAndroidApp

@HiltAndroidApp
class DefaultApplication :Application(),ImageLoaderFactory {

    override fun newImageLoader(): ImageLoader {
        return ImageLoader.Builder(this)
            .components {
                add(UnsplashSizingInterceptor)
            }.build()
    }
}